const app = getApp();
Page({
  data: {
    userName:'',
    runnerState:'',
    modalName:''
  },
  onLoad: function (options) {
    console.log(app.data.userInfo);
    this.setData({
      runnerState : app.data.userInfo.runnerstate,
      userName : app.data.userInfo.username
    })
    
},

  Auth(e) {
    var that=this;
    wx.request({
      url: 'https://www.woodymidnight.cn/BCUHelper/api/user/selectrunnerstatebyid',
      method: 'POST',
      data:{
        userId : app.data.userInfo.userid
      },
      header: { 'content-type': 'application/x-www-form-urlencoded' },
      success:e=>{
        this.setData({
          modalName : '1'
        })
      }
    })
  },

  Change(e){
    this.setData({
      modalName : '2'
    })
  } , 

  hideModal(e) {
    this.setData({
      modalName: null
    })
  },

  hideModal(e){
    wx.navigateBack();
  }
})